package com.company.cloud.mall.modules.api.response;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class OrderItemModel {

	@ApiModelProperty(value = "ID")
	private Integer id;

	@ApiModelProperty(value = "订单流水号")
	private String orderSn;

	@ApiModelProperty(value = "商品分类")
	private String productType;

	@ApiModelProperty(value = "商品编号")
	private String productNo;

	@ApiModelProperty(value = "主商品编号")
	private String mainProductNo;

	@ApiModelProperty(value = "SKU商品号")
	private String skuNo;

	@ApiModelProperty(value = "主SKU商品号")
	private String mainSkuNo;

	@ApiModelProperty(value = "艺术家编号")
	private String artistNo;

	@ApiModelProperty(value = "艺术家姓名")
	private String artistName;

	@ApiModelProperty(value = "艺术家头像")
	private String artistAvatar;

	@ApiModelProperty(value = "商品名称")
	private String name;

	@ApiModelProperty(value = "商品缩略图")
	private String thumbnail;

	@ApiModelProperty(value = "商品缩略图")
	private String thumbnailUrl;

	@ApiModelProperty(value = "商品规格")
	private String specifications;

	@ApiModelProperty(value = "表框编号")
	private String frameNo;

	@ApiModelProperty(value = "表框图")
	private String frameImage;

	@ApiModelProperty(value = "表框价格")
	private BigDecimal framePrice;

	@ApiModelProperty(value = "表框名称")
	private String frameName;
	
    @ApiModelProperty(value = "扩展信息1")
    private String extendOne;
    
    @ApiModelProperty(value = "扩展信息2")
    private String extendTwo;
    
    @ApiModelProperty(value = "扩展信息3")
    private String extendThree;

	@ApiModelProperty(value = "价格")
	private BigDecimal price;

	@ApiModelProperty(value = "数量")
	private Integer quantity;

	@ApiModelProperty(value = "已发货数量")
	private Integer shippedQuantity;

	@ApiModelProperty(value = "已退货数量")
	private Integer returnedQuantity;

	@ApiModelProperty(value = "已退货未发货数量")
	private Integer returnedNotSendQuantity;

	@ApiModelProperty(value = "是否分销商品")
	private String isDisProduct;

	@ApiModelProperty(value = "是否支持退换货")
	private String isExchangePurchase;

	// ====
//	@ApiModelProperty(value = "进行中退款流水号")
//	private String refundSN;
//	
//	@ApiModelProperty(value = "进行中退款退货流水号")
//	private String returnSN;

	@ApiModelProperty(value = "退款明细")
	private List<OrderRefundsModel> refunds;

	@ApiModelProperty(value = "退款退货明细")
	private List<OrderReturnsModel> returns;

	@ApiModelProperty(value = "最新退款(退款退货)")
	private OrderAfterModel lastAfter;

	@ApiModelProperty(value = "兑换码")
	private List<OrderTicketCodeModel> ticketCodes;

	public void addRefunds(OrderRefundsModel item) {
		if (this.refunds == null) {
			this.refunds = new ArrayList<OrderRefundsModel>();
		}
		if (item != null) {
			this.refunds.add(item);
		}
	}

	public void addReturns(OrderReturnsModel item) {
		if (this.returns == null) {
			this.returns = new ArrayList<OrderReturnsModel>();
		}
		if (item != null) {
			this.returns.add(item);
		}
	}

}
